<#macro generateModel indent modelInfo>
<#if modelInfo.description??>
${indent}/**
${indent}* ${modelInfo.description}
${indent}*/
</#if>
${indent}public ${modelInfo.type} ${modelInfo.fieldName}<#if modelInfo.defaultValue??> = ${modelInfo.defaultValue?c}</#if>;
</#macro>
package ${basePackage}.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* @author ${author}
* 静态模板配置
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DataModel {
<#list modelConfig.models as modelInfo>

    <#--有分组-->
    <#if modelInfo.groupKey??>
        /**
        * ${modelInfo.groupName}
        */
    public ${modelInfo.type} ${modelInfo.groupKey} = new ${modelInfo.type}();

        /**
        * ${modelInfo.description}
        */
        @Data
    public static class ${modelInfo.type}{
            <#list modelInfo.models as modelInfo>
                <@generateModel indent="        " modelInfo=modelInfo />
            </#list>
    }
        <#--没有分组-->
        <#else>
            <@generateModel indent="    " modelInfo=modelInfo/>
    </#if>

</#list>

}
